const blockSeparator = '<sep gap="36"/>'; // At default scale, about 28px
{/* <block type="bootTime" id="bootTime"/>
<block type="infiniteCycle" id="infiniteCycle"/> */}


function motion() {
 
//   <category name="%{BKY_MICROBIT_CONTROL}" id="control" colour="#FFAB19" secondaryColour="#CF8B17">
//   <block type="pauseSleep" id="pauseSleep">
//     <value name="sleepTime">
//       <shadow type="math_number">
//           <field name="NUM">10</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="control_repeat">
//       <value name="TIMES">
//           <shadow type="math_whole_number">
//               <field name="NUM">10</field>
//           </shadow>
//       </value>
//   </block>
//   <block id="forever" type="control_forever"/>
//   <block type="controls_if"/>
//   <block type="control_if_else"/>
//   <block type="_while" id="_while">
//     <value name="_whiles">
//       <shadow type="text">
//         <field name="TEXT">true</field>
//       </shadow>
//     </value>
//   </block>
  
// </category>



// <category name="%{BKY_MICROBIT_OPERATORS}" id="operators" colour="#40BF4A" secondaryColour="#389438">
//   <block type="operator_add">
//     <value name="NUM1">
//       <shadow type="text">
//         <field name="TEXT">0</field>
//       </shadow>
//     </value>
//     <value name="NUM2">
//       <shadow type="text">
//           <field name="TEXT">0</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="operator_subtract">
//     <value name="NUM1">
//       <shadow type="text">
//           <field name="TEXT">0</field>
//       </shadow>
//     </value>
//     <value name="NUM2">
//       <shadow type="text">
//           <field name="TEXT">0</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="operator_multiply">
//     <value name="NUM1">
//       <shadow type="text">
//         <field name="TEXT">0</field>
//       </shadow>
//     </value>
//     <value name="NUM2">
//       <shadow type="text">
//         <field name="TEXT">0</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="operator_divide">
//     <value name="NUM1">
//       <shadow type="text">
//         <field name="TEXT">0</field>
//       </shadow>
//     </value>
//     <value name="NUM2">
//       <shadow type="text">
//         <field name="TEXT">0</field>
//       </shadow>
//     </value>
//   </block>
//   ${blockSeparator}
//   <block type="operator_gt">
//     <value name="OPERAND1">
//       <shadow type="text">
//         <field name="TEXT">0</field>
//       </shadow>
//     </value>
//     <value name="OPERAND2">
//         <shadow type="text">
//             <field name="TEXT">0</field>
//         </shadow>
//     </value>
//   </block>
//   <block type="operator_lt">
//     <value name="OPERAND1">
//       <shadow type="text">
//           <field name="TEXT">0</field>
//       </shadow>
//     </value>
//     <value name="OPERAND2">
//         <shadow type="text">
//           <field name="TEXT">0</field>
//         </shadow>
//     </value>
//   </block>
//   <block type="operator_equals">
//     <value name="OPERAND1">
//         <shadow type="text">
//             <field name="TEXT">0</field>
//         </shadow>
//     </value>
//     <value name="OPERAND2">
//         <shadow type="text">
//             <field name="TEXT">0</field>
//         </shadow>
//     </value>
//   </block>
//   <block type="notis" id="notis">
//     <value name="notiss1">
//       <shadow type="math_number">
//         <field name="NUM">0</field>
//       </shadow>
//     </value>
//     <value name="notiss2">
//       <shadow type="math_number">
//         <field name="NUM">0</field>
//       </shadow>
//     </value>
//   </block>
//   ${blockSeparator}
//   <block type="operator_ands"/>
//   <block type="operator_ors"/>
//   <block type="operator_bools">
//   </block>
//   <block type="operator_notbools"/>
//   <block type="initData">
//     <value name="data">
//       <shadow type="math_number">
//         <field name="NUM">0</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="remainder">
//     <value name="data1">
//       <shadow type="math_number">
//         <field name="NUM">0</field>
//       </shadow>
//     </value>
//     <value name="data2">
//       <shadow type="math_number">
//         <field name="NUM">1</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="betweenNumbers">
//     <value name="data1">
//       <shadow type="math_number">
//         <field name="NUM">0</field>
//       </shadow>
//     </value>
//     <value name="data2">
//       <shadow type="math_number">
//         <field name="NUM">1</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="absoluteValue">
//     <value name="absolute">
//       <shadow type="text">
//         <field name="TEXT">0</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="squareRoot">
//     <value name="data">
//       <shadow type="math_number">
//         <field name="NUM">0</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="selectRandomNumber">
//     <value name="data1">
//       <shadow type="math_number">
//         <field name="NUM">0</field>
//       </shadow>
//     </value>
//     <value name="data2">
//       <shadow type="math_number">
//         <field name="NUM">10</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="randomBoolean"/>
//   <block type = "transferInt" id = "transferInt">
//     <value name="data">
//       <shadow type="math_number">
//         <field name="NUM">10.0</field>
//       </shadow>
//     </value>
//   </block>
// </category>
// <category name="%{BKY_MICROBIT_VARIABLES}" id="variables" colour="#e64d00" secondaryColour="#e64d00">
//   <block type="set_variable" id="set_variable">
//     <value name="STEPS">
//       <shadow type="text">
//         <field name="TEXT">A</field>
//       </shadow>
//     </value>
//     <value name="STEPS1">zzzzzzzz
//       <shadow type="text">
//           <field name="TEXT"></field>
//       </shadow>
//     </value>
//   </block>
//   <block type="get_variable" id="get_variable">
//     <value name="STEPS1">
//       <shadow type="text">
//         <field name="TEXT">A</field>
//       </shadow>
//     </value>
//   </block>
// </category>

// <category name="%{BKY_MICROBIT_TEXT}" id="editText" colour="#B8860B" secondaryColour="#B8860B">
//   <block type="nullValue" id="nullValue">
//      <value name="inputText">
//         <shadow type="text">
//           <field name="TEXT">hello world</field>
//         </shadow>
//       </value>
//   </block>
//   <block type="returnStringLength" id="returnStringLength">
//       <value name="inputText">
//         <shadow type="text">
//           <field name="TEXT">"您好"</field>
//         </shadow>
//       </value>
//   </block>
//   <block type="comparativeText" id="comparativeText">
//       <value name="inputText1">
//         <shadow type="text">
//           <field name="TEXT">"abc"</field>
//         </shadow>
//       </value>
//       <value name="inputText2">
//         <shadow type="text">
//           <field name="TEXT">"abc"</field>
//         </shadow>
//       </value>
//   </block>
//   <block type="getSubString" id="getSubString">
//       <value name="inputText">
//         <shadow type="text">
//           <field name="TEXT">"hello Micro:bit"</field>
//         </shadow>
//       </value>
//       <value name="startPosition">
//         <shadow type="math_number">
//           <field name="NUM">0</field>
//         </shadow>
//       </value>
//       <value name="length">
//         <shadow type="math_number">
//           <field name="NUM">10</field>
//         </shadow>
//       </value>
//   </block>
//   <block type="isEmptyText" id="isEmptyText">
//       <value name="inputText">
//         <shadow type="text">
//           <field name="TEXT">"micro:bit"</field>
//         </shadow>
//       </value>
//   </block>
//   <block type="parseToNumber" id="parseToNumber">
//       <value name="inputText">
//         <shadow type="text">
//           <field name="TEXT">"123"</field>
//         </shadow>
//       </value>
//   </block>
//   <block type="getIndexChar" id="getIndexChar">
//       <value name="inputText">
//         <shadow type="text">
//           <field name="TEXT">"123"</field>
//         </shadow>
//       </value>
//       <value name="startPosition">
//         <shadow type="math_number">
//           <field name="NUM">0</field>
//         </shadow>
//       </value>
//   </block>
//   <block type="extractText" id="extractText">
//       <value name="inputText">
//         <shadow type="math_number">
//           <field name="NUM">65</field>
//         </shadow>
//       </value>
//   </block>
//   <block type="convertToText" id="convertToText">
//       <value name="integer">
//         <shadow type="math_number">
//           <field name="NUM">30</field>
//         </shadow>
//       </value>
//   </block>
// </category>

// <category name="microbit" id="microbit" colour="#00979D" secondaryColour="#008888">
// <label text="%{BKY_MICROBIT_MICROBITEVENTS}" web-class="ioLabel"></label>
// <block type="microbitStart" id="microbitStart"/>
// <block type="microbitLoop" id="microbitLoop"/>


// <label text="%{BKY_MICROBIT_SERIAL}" web-class="ioLabel"></label>
// <block type="serialPrintingString" id="serialPrintingString">
//     <value name="value">
//       <shadow type="text">
//         <field name="TEXT">"micro:bit"</field>
//       </shadow>
//     </value>
//   </block>  
//   <label text="%{BKY_MICROBIT_BASEFUNC}" web-class="ioLabel"></label>
//   <block type="buttonPressed" id="buttonPressed"/>
//   <block type="stateChange" id="stateChange"/>
//   <block type="pinTouched" id="pinTouched"/>
//   <block type="buttonPressedTowState" id="buttonPressedTowState"/>
//   <block type="pinPressedTowState" id="pinPressedTowState"/>
// <block type="accelerationValue" id="accelerationValue"/>
// <block type="pointerOrientation" id="pointerOrientation"/>
// <block type="temperaTure" id="temperaTure"/>
// <block type="rotationMode" id="rotationMode"/>
// <block type="magneticForce" id="magneticForce"/>
// <block type="calibrateCompass" id="calibrateCompass"/>

// <label text="%{BKY_MICROBIT_DISPLAY}" web-class="ioLabel"></label>
// <block type="displayShowNumber" id="displayShowNumber">
// <value name="displayShowNumber">
//   <shadow type="math_number">
//     <field name="NUM">20</field>
//   </shadow>
// </value>
// </block>
// <block type="displayShowImageView" id="displayShowImageView"/>
// <block type="displayShowString" id="displayShowString">
// <value name="displayShowString">
//   <shadow type="text">
//     <field name="TEXT">"Hello World"</field>
//   </shadow>
// </value>
// </block>
// <block type="emptyScreen" id="emptyScreen"/>
// <block type="displayShowArrow" id="displayShowArrow"/>
// <block type="createImage" id="createImage"/>
// <block type="showImage" id="showImage">
//     <value name="myImage">
//       <shadow type="text">
//         <field name="TEXT">myImage</field>
//       </shadow>
//     </value>
//     <value name="position">
//       <shadow type="math_number">
//         <field name="NUM">0</field>
//       </shadow>
//     </value>
// </block>
// <block type="rollImage" id="rollImage">
//   <value name="myImage">
//     <shadow type="text">
//       <field name="TEXT">myImage</field>
//     </shadow>
//   </value>
//   <value name="position">
//     <shadow type="math_number">
//       <field name="NUM">0</field>
//     </shadow>
//   </value>
//   <value name="time">
//     <shadow type="math_number">
//       <field name="NUM">200</field>
//     </shadow>
//   </value>
// </block>
// <block type="arrowImage" id="arrowImage"/>



// <block type="drawing" id="drawing">
// <value name="x">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// <value name="y">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// </block>
// <block type="drawingLight" id="drawingLight">
// <value name="x">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// <value name="y">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// <value name="brightness">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// </block>
// <block type="cancelMapping" id="cancelMapping">
// <value name="x">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// <value name="y">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// </block>
// <block type="switchMapping" id="switchMapping">
// <value name="x">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// <value name="y">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// </block>
// <block type="spotMapping" id="switchMapping">
// <value name="x">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// <value name="y">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// </block>
// <block type="drawBarType" id="drawBarType">
// <value name="x">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// <value name="y">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// </block>

// <block type="brightness" id="brightness" />
// <block type="setBrightness" id="setBrightness">
// <value name="brightness">
//   <shadow type="math_number">
//     <field name="NUM">9</field>
//   </shadow>
// </value>
// </block>
// <block type="stopAnimation" id="stopAnimation"/>

// <label text="%{BKY_MICROBIT_PIN}" web-class="ioLabel"></label>
// <block type="digitalReadPin" id="digitalReadPin"/>
//   <block type="writeDigitalValue" id="writeDigitalValue">
//     <value name="value">
//       <shadow type="math_number">
//         <field name="NUM">0</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="analogReadPin" id="analogReadPin"/>
//   <block type="writeAnalogValue" id="writeAnalogValue">
//     <value name="value">
//       <shadow type="math_number">
//         <field name="NUM">1023</field>
//       </shadow>
//     </value>
//   </block>
 
//   <block type="mapping" id="mapping">
//     <value name="mapping">
//       <shadow type="math_number">
//         <field name="NUM">0</field>
//       </shadow>
//     </value>
//     <value name="low">
//       <shadow type="math_number">
//         <field name="NUM">0</field>
//       </shadow>
//     </value>
//     <value name="high">
//       <shadow type="math_number">
//         <field name="NUM">1023</field>
//       </shadow>
//     </value>
//     <value name="tolow">
//       <shadow type="math_number">
//         <field name="NUM">0</field>
//       </shadow>
//     </value>
//     <value name="tohigh">
//       <shadow type="math_number">
//         <field name="NUM">4</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="writeServoValue" id="writeServoValue">
//     <value name="value">
//       <shadow type="math_number">
//         <field name="NUM">180</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="setServoPulse" id="setServoPulse">
//     <value name="pulse">
//       <shadow type="math_number">
//         <field name="NUM">1500</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="statusChangesEvent" id="statusChangesEvent"/>
//   <block type="pulseDurationPin" id="pulseDurationPin"/>
//   <block type="spiFrequency" id="spiFrequency">
//     <value name="value">
//       <shadow type="math_number">
//         <field name="NUM">1000</field>
//       </shadow>
//     </value>
//     <value name="time">
//       <shadow type="math_number">
//         <field name="NUM">0</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="spiFormatDigits" id="spiFormatDigits">
//     <value name="value">
//       <shadow type="math_number">
//         <field name="NUM">8</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="spiSetPin" id="spiSetPin"/>

//   <block type="spiWrite" id="spiWrite">
//   <value name="value">
//     <shadow type="math_number">
//       <field name="NUM">0</field>
//     </shadow>
//   </value>
// </block>

// <label text="%{BKY_MICROBIT_MUSIC}" web-class="ioLabel"></label>
// <block type="setAnalogScalePin" id="setAnalogScalePin">
// <value name="frequency">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// <value name="time">
//   <shadow type="math_number">
//     <field name="NUM">0</field>
//   </shadow>
// </value>
// </block>

//   <block type="playTone" id="playTone">
//   </block>

//   <block type="playRingTone" id="playRingTone">
//     <value name="tone">
//       <shadow type="text">
//         <field name="TEXT">中C</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="pausePlayback" id="pausePlayback">
//   </block>
//   <block type="playMelody" id="playMelody"/>
//   <block type="stopMelody" id="stopMelody"/>
//   <block type="bpmSetting" id="bpmSetting">
//     <value name="bpm">
//       <shadow type="math_number">
//         <field name="NUM">120</field>
//       </shadow>
//     </value>
//   </block>

//   <label text="%{BKY_MICROBIT_WIFI}" web-class="ioLabel"></label>


//   <block type="wifiSetting" id="wifiSetting">
//     <value name="setWifi">
//       <shadow type="math_number">
//         <field name="NUM">7</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="openWifi" id="openWifi">
//   </block>
//   <block type="wifiSendNumber" id="wifiSendNumber">
//     <value name="setWifiNumber">
//       <shadow type="math_number">
//         <field name="NUM">20</field>
//       </shadow>
//     </value>
//   </block>
  
//   <block type="wifiSettingString" id="wifiSettingString">
//     <value name="setwifiString">
//       <shadow type="text">
//         <field name="TEXT">"test"</field>
//       </shadow>
//     </value>
//   </block>
//   <block type="receivingData" id="receivingData"/>

//   <block type="wifiTansmitPower" id="wifiTansmitPower">
//     <value name="power">
//       <shadow type="math_number">
//         <field name="NUM">7</field>
//       </shadow>
//     </value>
//   </block>
// </category>
     
   
const Xml = `

    <category name="%{BKY_MICROBIT_BASEMODEL}" id="microbit_baseModel" colour="#179b73" secondaryColour="#179b73">
      <block type="microbit_button" id="microbit_button"/>
      <block type="microbit_touch" id="microbit_touch"/>
      <block type="microbit_knockswitch" id="microbit_knockswitch"/>
      <block type="microbit_resistance" id="microbit_resistance"/>
      <block type="microbit_encoderButtonPressed" id="microbit_encoderButtonPressed"/>
      <block type="microbit_encoderPulse" id="microbit_encoderPulse"/>
      <block type="microbit_pianoInit" id="microbit_pianoInit"/>
      <block type="microbit_piano" id="microbit_piano"/>
      <block type="microbit_slipresistance" id="microbit_slipresistance"/>
      <block type="microbit_rockData" id="microbit_rockData"/>
      <block type="microbit_rock" id="microbit_rock"/>
      <block type="microbit_maxtixKeyPadInit" id="microbit_maxtixKeyPadInit"/>
      <block type="microbit_maxtixKeyPad" id="microbit_maxtixKeyPad"/>
    </category>

    <category name="%{BKY_MICROBIT_SHOW}" id="microbit_show" colour="#f59057" secondaryColour="#f59057">
      <block type="microbit_led" id="microbit_led"/>

      <block type="microbit_lcdinit" id="microbit_lcdinit">
        <value name="microbit_lcdinits">
          <shadow type="math_number">
            <field name="NUM">39</field>
          </shadow>
        </value>
      </block>
      <block type="microbit_lcdClear" id="microbit_lcdClear"/>
      <block type="microbit_lcdScreen" id="microbit_lcdScreen"/>
      <block type="microbit_lcdBackLight" id="microbit_lcdBackLight"/>
      <block type="microbit_lcdShift" id="microbit_lcdShift"/>

      <block type="microbit_lcdposition" id="microbit_lcdposition">
        <value name="col">
          <shadow type="math_number">
            <field name="NUM">1</field>
          </shadow>
        </value>
        <value name="row">
          <shadow type="math_number">
            <field name="NUM">1</field>
          </shadow>
        </value>
        <value name="lcdStr">
          <shadow type="text">
            <field name="TEXT">"hello micro:bit"</field>
          </shadow>
        </value>
      </block>
      
      <block type="microbit_tm1650Init" id="microbit_tm1650Init"/>
      <block type="microbit_tm1650display" id="microbit_tm1650display">
        <value name="tm1650Data"> 
          <shadow type="math_number"> 
            <field name="NUM">1</field> 
          </shadow> 
        </value> 
      </block>
      <block type="microbit_tm1650PointDisplay" id="microbit_tm1650PointDisplay" />
      <block type="microbit_tm1650ShowNumber" id="microbit_tm1650ShowNumber">
        <value name="tm1650Number"> 
          <shadow type="math_number"> 
            <field name="NUM">1</field> 
          </shadow> 
        </value> 
      </block>

      <block type="microbit_tm1650Clear" id="microbit_tm1650Clear"/>
      <block type="microbit_tm1637Init" id="microbit_tm1637Init"/>
      <block type="microbit_tm1637display" id="microbit_tm1650display">
        <value name="tm1637Data"> 
          <shadow type="math_number"> 
            <field name="NUM">1</field> 
          </shadow> 
        </value> 
      </block>
      <block type="microbit_tm1637ShowNumber" id="microbit_tm1637ShowNumber">
      <value name="tm1637Number"> 
        <shadow type="math_number"> 
          <field name="NUM">9999</field> 
        </shadow> 
      </value> 
    </block>
      <block type="microbit_tm1637Clear" id="microbit_tm1637Clear"/>

      <block type="microbit_matrix7219Init" id="microbit_matrix7219Init"/>
      <block type="microbit_matrix7219SetPixel" id="microbit_matrix7219SetPixel">
        <value name="matrixX"> 
          <shadow type="math_number"> 
            <field name="NUM">1</field> 
          </shadow> 
        </value> 
        <value name="matrixY"> 
          <shadow type="math_number"> 
            <field name="NUM">1</field> 
          </shadow> 
        </value> 
        <value name="intensity"> 
          <shadow type="math_number"> 
            <field name="NUM">1</field> 
          </shadow> 
        </value> 
      </block>
      <block type="microbit_matrix7219Draw" id="microbit_matrix7219Draw" />

     
      <block type="microbit_trafficlightsInit" id="microbit_trafficlightsInit"/>
      <block type="microbit_trafficlights" id="microbit_trafficlights">
        <value name="lightTime1"> 
          <shadow type="math_number"> 
            <field name="NUM">1</field> 
          </shadow> 
        </value> 
      </block>
      <block type="microbit_rgbcolorInit" id="microbit_rgbcolorInit"/>
      <block type="microbit_rgbcolor" id="microbit_rgbcolor">
        <value name="COLOR">
          <shadow type="colour_picker"/>
        </value>
      </block>  
      
    </category>

    <category name="%{BKY_MICROBIT_ACTION}" id="microbit_action" colour="#FF0000" secondaryColour="#FF0000">
      <block type="microbit_motor" id="microbit_motor">
        <value name="motorSpeed"> 
          <shadow type="math_number"> 
            <field name="NUM">100</field> 
          </shadow> 
        </value> 
      </block>
      <block type="microbit_relay" id="microbit_relay"/>
      <block type="microbit_laser" id="microbit_laser"/>
      <block type="microbit_buzzer" id="microbit_buzzer">
        <value name="buzzers"> 
          <shadow type="math_number"> 
            <field name="NUM">300</field> 
          </shadow> 
        </value> 
        <value name="time"> 
          <shadow type="math_number"> 
            <field name="NUM1">1000</field> 
          </shadow> 
        </value> 
      </block>
      <block type="microbit_passive_buzzer" id="microbit_passive_buzzer">
        <value name="play_time"> 
          <shadow type="math_number"> 
            <field name="NUM1">1000</field> 
          </shadow> 
        </value> 
      </block>
      <block type="microbit_servo" id="microbit_servo">
      <value name="servoAngle"> 
        <shadow type="math_number"> 
          <field name="NUM">30</field> 
        </shadow> 
      </value> 
    </block>
    </category>
    
    <category name="%{BKY_MICROBIT_SENSORS}" id="microbit_sensors" colour="#28BFE6" secondaryColour="#28BFE6">
      <block type="microbit_vioceDigital" id="microbit_vioceDigital"/>
      <block type="microbit_vioceAnalog" id="microbit_vioceAnalog"/>
      <block type="microbit_light" id="microbit_light"/>
      <block type="microbit_thermosensitive" id="microbit_thermosensitive"/>
      <block type="microbit_fire" id="microbit_fire"/>
      <block type="microbit_fireReadDigital" id="microbit_fireReadDigital"/>
      <block type="microbit_DHT11" id="microbit_DHT11"/>

      <block type="microbit_lm35" id="microbit_lm35"/>

      <block type="microbit_gasDigital" id="microbit_gasDigital"/>
      <block type="microbit_gasAnalog" id="microbit_gasAnalog"/>

      <block type="microbit_soil" id="microbit_soil"/>

      <block type="microbit_rainDigital" id="microbit_rainDigital"/>
      <block type="microbit_rainAnalog" id="microbit_rainAnalog"/>

      <block type="microbit_waterdeep" id="microbit_waterdeep"/>
      <block type="microbit_body" id="microbit_body"/>
      <block type="microbit_track" id="microbit_track"/>
      <block type="microbit_reed_switch" id="microbit_reed_switch"/>
      <block type="microbit_grayscale" id="microbit_grayscale"/>
     
      <block type="microbit_shockDigital" id="microbit_shockDigital"/>
      <block type="microbit_shockAnalog" id="microbit_shockAnalog"/>
      
      <block type="microbit_AvoidanceDigital" id="microbit_AvoidanceDigital"/>
      
      <block type="microbit_tilt" id="microbit_tilt"/>
      <block type="microbit_rgbUltrasonicInit" id="microbit_rgbUltrasonicInit"/>
      <block type="microbit_rgbUltrasonicDistance" id="microbit_rgbUltrasonicDistance"/>
      <block type="microbit_rgbUltrasonicColor" id="microbit_rgbUltrasonicColor">
        <value name="rgbBrightness"> 
          <shadow type="math_number"> 
            <field name="NUM0">0</field> 
          </shadow> 
        </value> 
        <value name="COLOR">
          <shadow type="colour_picker"/>
        </value> 
      </block>

      <block type="microbit_ultrasonicInit" id="microbit_ultrasonicInit"/>
      <block type="microbit_ultrasonicDistance" id="microbit_ultrasonicDistance"/>
      <block type="microbit_irInit" id="microbit_irInit"/>
      <block type="microbit_ir" id="microbit_ir"/>
      <block type="microbit_irLogic" id="microbit_irLogic"/>
    </category>
  `;

  const categoriesXML = `
            ${Xml}
        `;
  return categoriesXML;
};

module.exports = motion();

// <block type="microbit_ec11Init" id="microbit_ec11Init"/>
// <block type="microbit_ec11" id="microbit_ec11"/>
// <block type="microbit_ec11ButtonPushDown" id="microbit_ec11ButtonPushDown"/>


// <block type="microbit_lcdinit" id="microbit_lcdinit">
    //   <value name="lcdinits"> 
    //     <shadow type="text"> 
    //       <field name="TEXT">0x27</field> 
    //     </shadow> 
    //   </value> 
    // </block>
    // <block type="microbit_lcdposition" id="microbit_lcdposition">
    //   <value name="col"> 
    //     <shadow type="math_number"> 
    //       <field name="NUM">1</field> 
    //     </shadow> 
    //   </value> 
    //   <value name="row"> 
    //     <shadow type="math_number"> 
    //       <field name="NUM">1</field> 
    //     </shadow> 
    //   </value> 
    // </block>
    // <block type="microbit_lcdprint" id="microbit_lcdprint">
    //   <value name="lcdprints"> 
    //     <shadow type="text"> 
    //       <field name="TEXT">hello</field> 
    //     </shadow> 
    //   </value> 
    // </block>
    // <block type="microbit_lcdclear" id="microbit_lcdclear"/>
     // <block type="microbit_max" id="microbit_max">
      //   <value name="maxs"> 
      //     <shadow type="math_number"> 
      //       <field name="NUM">1</field> 
      //     </shadow> 
      //   </value> 
      // </block>
      // <block type="microbit_maxpoint" id="microbit_maxpoint"/>
      // <block type="microbit_x8leddisplay" id="microbit_x8leddisplay"/>


      // <block type="microbit_ringRgbColorInit" id="microbit_ringRgbColorInit"/>
      // <block type="microbit_setRingRgbLight" id="microbit_setRingRgbLight">
      //   <value name="rgbLight"> 
      //     <shadow type="math_number"> 
      //       <field name="NUM0">10</field> 
      //     </shadow> 
      //   </value> 
      // </block>
      // <block type="microbit_ringRgbColor" id="microbit_ringRgbColor">
      //   <value name="total"> 
      //     <shadow type="math_number"> 
      //       <field name="NUM0">12</field> 
      //     </shadow> 
      //   </value> 
      //   <value name="start"> 
      //     <shadow type="math_number"> 
      //       <field name="NUM4">1</field> 
      //     </shadow> 
      //   </value> 
      //   <value name="end"> 
      //     <shadow type="math_number"> 
      //       <field name="NUM5">12</field> 
      //     </shadow> 
      //   </value> 
      //   <value name="lightTime"> 
      //     <shadow type="math_number"> 
      //       <field name="NUM6">500</field> 
      //     </shadow> 
      //   </value> 
      //   <value name="rgbRingr"> 
      //     <shadow type="math_number"> 
      //       <field name="NUM1">0</field> 
      //     </shadow> 
      //   </value> 
      //   <value name="rgbRingg"> 
      //     <shadow type="math_number"> 
      //       <field name="NUM2">0</field> 
      //     </shadow> 
      //   </value> 
      //   <value name="rgbRingb"> 
      //     <shadow type="math_number"> 
      //       <field name="NUM3">0</field> 
      //     </shadow> 
      //   </value> 
      // </block>


       // <block type="microbit_servo" id="microbit_servo">
      //   <value name="microbitservoangle"> 
      //     <shadow type="math_number"> 
      //       <field name="NUM">0</field> 
      //     </shadow> 
      //   </value> 
      // </block>
      // <block type="microbit_buzzerplay2" id="microbit_buzzerplay2"/>
      // <block type="microbit_irsend" id="microbit_irsend">
      //   <value name="irdata2"> 
      //     <shadow type="text"> 
      //       <field name="TEXT">0x89ABCDEF</field> 
      //     </shadow> 
      //   </value> 
      //   <value name="irbyte2"> 
      //     <shadow type="text"> 
      //       <field name="TEXT">32</field> 
      //     </shadow> 
      //   </value> 
      // </block>
      // <block type="microbit_irreceive" id="microbit_irreceive"/>
      // <block type="microbit_irreceivedata" id="microbit_irreceivedata"/>
      // <block type="microbit_irKeyPress" id="microbit_irKeyPress"/>
      // <block type="microbit_emakefunIrKeyPress" id="microbit_emakefunIrKeyPress"/>
      // <block type="microbit_matrixKeyboardInit" id="microbit_matrixKeyboardInit"/>
      // <block type="microbit_matrixKeyboardFunc" id="microbit_matrixKeyboardFunc"/>
      // <block type="microbit_getMatrixKeyboardValue" id="microbit_getMatrixKeyboardValue"/>


      // <block type="microbit_dht11" id="microbit_dht11"/>
      // <block type="microbit_ds18B20" id="microbit_ds18B20"/>
      // <block type="microbit_readds" id="microbit_readds"/>
      // <block type="microbit_air" id="microbit_air"/>
      // <block type="microbit_handleGestureInit" id="microbit_handleGestureInit"/>
      // <block type="microbit_gesture" id="microbit_gesture"/>
      // <block type="microbit_gestureStatus" id="microbit_gestureStatus"/>
      // <block type="microbit_handle_gesture" id="microbit_handle_gesture"/>
      // <block type="microbit_ultrasonic" id="microbit_ultrasonic"/>
      // <block type="microbit_rgbultrasonicsetcolorstyle" id="microbit_rgbultrasonicsetcolorstyle"/>
      // <block type="microbit_rgbultrasonicreaddistance" id="microbit_rgbultrasonicreaddistance"/>
      // <block type="microbit_ultrasonic" id="microbit_ultrasonic"/>